package stylistcrm.core.services.security.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yanwc on 2016/9/7.
 */
public class DataAuthorityDto {
    private String viewName;
    private String modelName;
    private List<FieldAuthorityDto> listFieldAuthority;

    public void addFieldAuthrority(FieldAuthorityDto field){
        if(field == null) return;
        if(this.listFieldAuthority == null){
            this.listFieldAuthority = new ArrayList<>();
        }
        this.listFieldAuthority.add(field);
    }

    public String getViewName() {
        return viewName;
    }

    public void setViewName(String viewName) {
        this.viewName = viewName;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public List<FieldAuthorityDto> getListFieldAuthority() {
        return listFieldAuthority;
    }
}
